home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10327 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Help !!!!! on 'strstr"
  5. Date: Sat, 16 Mar 96 20:46:30 GMT
  6. Organization: none
  7. Message-ID: <827009190snz@genesis.demon.co.uk>
  8. References: <314703FF.4045@msmail.st.stems.com> <jodellDo7097.Bto@netcom.com> <TANMOY.96Mar13090926@qcd.lanl.gov> <3147C7AC.6EE3@hsc.unt.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <3147C7AC.6EE3@hsc.unt.edu>
  15.            sfogoros@hsc.unt.edu "Steve Fogoros" writes:
  16.  
  17. >Tanmoy Bhattacharya wrote:
  18. >
  19. >> Any user function whose name begins with `is' followed by a lower case
  20. >> letter violates the ANSI C standard.
  21. >
  22. >You mentioned the same kind of violation regarding user functions that start
  23. > with
  24. >'str' followed by lower case letter in another post.
  25.  
  26. This is an example of a reserved identifier. Future versions of the language
  27. could add definitions for such identifiers in standard headers and as
  28. identifiers with external linkage so to make you code future-proof you should
  29. avoid using them.
  30.  
  31. > I apologize that I
  32. > question
  33. >this without being intimately familiar with ANSI C Standard. I am having a hard
  34. > time
  35. >believing the standard would consider my use of other than reserved words a
  36. > violation.
  37.  
  38. The standard says that if you declare or define an identifier in a context
  39. where it it reserved the result is undefined behaviour. Basically your
  40. usage may clash with an implementation usage for that identifier.
  41.  
  42. >(What kind of ticket would I get for an infraction? Is the implementation
  43. > required to
  44. >check for this and warn or error?)
  45.  
  46. No diagnostic is required.
  47.  
  48. -- 
  49. -----------------------------------------
  50. Lawrence Kirby | fred@genesis.demon.co.uk
  51. Wilts, England | 70734.126@compuserve.com
  52. -----------------------------------------
  53.